<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
    components: {
        SelectImageRadio: async () =>
            Vue.extend(await Vue.prototype.$vFN.Components.Base.SelectImageRadio()),
        SelectDataGoods: async () =>
            Vue.extend(await Vue.prototype.$vFN.Components.Base.SelectDataGoods()),
    },
    data() {
        return {
            appWindow: window,
            form: {
                // 策略类型,0无策略，1独立策略
                risk_type: 1,
                // 1价格策略 ，2利润率策略
                risk_strategy: 1,
                // 利润百分比
                risk_ratio: null,
                // 
                goods_ids: [],
                // 创建时间
                // created_time: "",
            },

            // 页面接口地址
            apiUrl: {
                create: "plugin/supply/RiskControl/add",
                update: "plugin/supply/RiskControl/edit",
                detail: "plugin/supply/RiskControl/details",
            },
        };
    },
    methods: {
        // form 提交添加/修改 的参数扩展方法
        mixinEdit_editFormSubmitExtend(data_) {

            return data_;
        },
        // 初始化
        async init() {
            // 初始化数据
            await this.mixinEdit_editBoxInit({
                model: "form",
                id: this.id,
            });
            // 显示窗口
            // this.mixinEdit_editVisible = true;
        },

    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>